///////////////////////////////////////////////////////////////////////////////
//
// DBT86 Project : Native Process Support : x86 : x86/Linux, gcc
// Copyright (C) 2004 by Ben Hertzberg and Stanford University
// All Rights Reserved
//
// This code may not be used for any purpose without the express written
// consent of the author.  See the LICENSE.txt file for details.
//
//
// DESCRIPTION
//
// This file contains some platform-specific x86 hooks to help with
// accessing native CPU state.
//
///////////////////////////////////////////////////////////////////////////////

#ifndef __NATIVE_H__
#define __NATIVE_H__

#define X86NATIVE_GET_REG_EBP(x) asm volatile ("movl %%ebp,%0" : "=r" (x));
#define X86NATIVE_GET_REG_ESP(x) asm volatile ("movl %%esp,%0" : "=r" (x));

#define X86NATIVE_SET_REG_EBP(x) asm volatile ("movl %0,%%ebp" : : "r" (x));
#define X86NATIVE_SET_REG_ESP(x) asm volatile ("movl %0,%%esp" : : "r" (x));

#endif
